import request from "@/utils/request";
// import { Result } from "@/types";

class StudentGiftAPI {
  /**
   * 学生兑换礼物
   */
  static exchange(data: any) {
    return request<any, any>({
      url: "/api/student-gift/exchange",
      method: "post",
      data,
    });
  }

  /**
   * 获取学生兑换记录
   */
  static getExchangeRecords(studentId: number | string) {
    return request<any, any>({
      url: "/api/student-gift/records",
      method: "post",
      data: {
        studentId,
      },
    });

  }
  // src/api/student-gift.ts
  static getAllExchangeRecords() {
    return request<any, any>({
      url: "/api/student-gift/all",
      method: "get",
    });
  }
}

export default StudentGiftAPI;
